function CacheKey() {
}

CacheKey.repoKey = function (owner, repo) {
    return owner + ":" + repo;
}

CacheKey.maxPageKey = function (repoKey) {
    return repoKey + ":maxPage";
}

CacheKey.totalKey = function (repoKey) {
    return repoKey + ":total";
}

CacheKey.starInfoKey = function (repoKey) {
    return repoKey + ":starInfo";
}

CacheKey.pageKey = function (repoKey, page) {
    return repoKey + ":" + page;
}

CacheKey.precessKey = function (repoKey) {
    return repoKey + ":load";
}

CacheKey.trendKey = {
    trend: function () {
        return 'trend';
    },
    trendUser: function () {
        return this.trend() + ':user';
    },
    user: function (owner) {
        return this.trendUser() + ':' + owner;
    },
    trendProject: function (owner) {
        return this.trend() + ":project:" + owner;
    },
    project: function (owner, repo) {
        return this.trendProject(owner) + ":" + repo;
    },
    startTime: function (owner, repo) {
        return this.trend() + ":startTime:" + owner + ":" + repo;
    },
    usageTime: function (owner, repo) {
        return this.trend() + ":usageTime:" + owner + ":" + repo;
    }
}

module.exports = CacheKey;